package com.axjy.task.controller;

import com.axjy.comm.client.QuartzClient;
import com.axjy.comm.vo.JobAndTrigger;
import com.axjy.task.feign.QuartzFeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/task")
public class TaskController {

    @Resource
    private QuartzFeignClient quartzFeignClient;


    @GetMapping("/queryAll")
    public List<JobAndTrigger> queryAll(){
        return quartzFeignClient.searchAll();
    }

}
